#include "Logic.h"

#ifdef PSX_DEBUG
	#pragma comment(lib,"Pulse-Tecd.lib")
#else
	#pragma comment(lib,"Pulse-Tec.lib")
#endif

namespace Pulse
{
		const CHAR * GetApplicationName( void )
	{
		return PSX_String("Editor");
	}

	Logic * CreateApplicationLogic( void )
	{
		return new AppLogic;
	}

	void ReleaseApplicationLogic( Logic *pLogic )
	{
		delete pLogic;
	}

	AppLogic::AppLogic( void )
	{
		//AddView( new AppView );

	}

	AppLogic::~AppLogic( void )
	{
	
	}

	EErrorCode::Type AppLogic::OnInitialize( void )
	{
		Engine *pEngine = Engine::GetInstance();

		FBXUtility util;

		EErrorCode::Type retCode = util.LoadScene( PSX_String("Data\\Models\\fbx\\sadface.fbx") );
		
		if ( retCode == EErrorCode::OKAY )
		{
			util.TriangulateScene();
			util.ExportGeometry();
		}
		else
		{

		}

		return EErrorCode::OKAY;
	}

	void AppLogic::OnShutdown( void )
	{
	}

	void AppLogic::OnUpdate( DOUBLE time, FLOAT dt )
	{
		
	}
}